package org.j5108.beans;

import java.math.BigDecimal;

/**
 * 商品类
 */
public class Product {
    private int id;
    private String name;
    private double price;
    private int count;
    private String desc;

    public Product(int id, String name, double price, int count, String desc) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.count = count;
        this.desc = desc;
    }

    public Product() {}

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("Product : [ ").append(id).append(" , ").append(name);
        sb.append(" , ").append(price).append(" , ").append(count).append(" , ");
        sb.append(desc).append(" ] ");
        return sb.toString();
    }
}
